import pyglet
import ui
import tiles
import level

def main():
    """ your app starts here
    """
    window = pyglet.window.Window(width=ui.WINDOW_SIZE[0], height=ui.WINDOW_SIZE[1])
    window.set_caption("Worlds Collide")
    helloString = tiles.createStringSprite("\"Hello, World!\" <:/\\:>")
    
    frame = tiles.createFrameSprite(*ui.STATUS_SIZE)
    frame.scale = 2
    frame.position = ui.WINDOW_CENTER
    
    l = level.Level()
    levelSprite = tiles.createLevelSprite(10,10,l.tiles)
    #sprite.color = (255,255,0)
    
    @window.event
    def on_draw():
        window.clear()
        levelSprite.draw()
        frame.draw()
    
    pyglet.app.run()
